package service;

import java.util.List;

import dao.IRoomDao;
import dao.IStudentDao;
import dao.Impl.RoomDaoImpl;
import dao.Impl.StudentDaoImpl;
import po.Room;
import po.Student;

public class ContactService {
	IRoomDao roomDao = new RoomDaoImpl();
	IStudentDao studentDao = new StudentDaoImpl();
	public void addStudent(Student student) {
		studentDao.save(student);
	}
	public void updateStudent(Student student) {
		studentDao.update(student);
	}
	public void deleteStudent(long studentNo) {
		studentDao.delete(studentNo);
	}
	public Student getStudent(long studentNo) {
		return studentDao.get(studentNo);
	}
	public List<Student> findAll(){
		return studentDao.findAll();
	}
	public Room get(int roomNo) {
		return roomDao.get(roomNo);
	}
	public Room get(String roomName) {
		return roomDao.get(roomName);
	}
}
